#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>


void X_printf(int x)
{
	for (int i = 1; i <= x; i++)
	{
		for (int j = 1; j <= i; j++)
		{
			printf("%d * %d = %d ", j, i, i * j);
		}
		printf("\n");
	}
}
int main()
{
	int x = 0;
	scanf("%d", &x);
	X_printf(x);
	return 0;
}